package com.service.device;

import com.dao.secondary.device.DeviceObdWorkDailyRecordInfoMapper;
import com.dao.secondary.device.DevicePcbWorkDailyRecordInfoMapper;
import com.github.pagehelper.PageHelper;
import com.model.domain.device.GetDeviceObdWorkDailyRecordInfoDO;
import com.model.domain.device.GetDevicePcbWorkDailyRecordInfoDO;
import com.model.pojo.device.DeviceObdWorkDailyRecordInfo;
import com.model.pojo.device.DevicePcbWorkDailyRecordInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Author: zql
 * @Description: obd作业日报统计信息服务
 * @Data: 2023-07-06
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class DevicePcbWorkDailyRecordInfoService {
    private final DevicePcbWorkDailyRecordInfoMapper devicePcbWorkDailyRecordInfoMapper;

    public List<DevicePcbWorkDailyRecordInfo> getPageList(GetDevicePcbWorkDailyRecordInfoDO getDevicePcbWorkDailyRecordInfoDO){
        PageHelper.clearPage();
        PageHelper.startPage(getDevicePcbWorkDailyRecordInfoDO.getPage(),getDevicePcbWorkDailyRecordInfoDO.getPageSize(),getDevicePcbWorkDailyRecordInfoDO.getSortRow()+getDevicePcbWorkDailyRecordInfoDO.getSortOrder());
        return devicePcbWorkDailyRecordInfoMapper.selectList(getDevicePcbWorkDailyRecordInfoDO);
    }

    public void saveList(List<DevicePcbWorkDailyRecordInfo> list){
        devicePcbWorkDailyRecordInfoMapper.insertListSelective(list);
    }
}
